<?

class PublicAction extends Action {

	public function sort() {
		
		C ( 'SHOW_RUN_TIME', false );
		C ( 'SHOW_PAGE_TRACE', false );
		
		$dir = str_replace('|', '/', $_GET['dir']);
		
		import ( "@.ORG.sort" );
		$sort = sort::get('news/' . $dir);
		
		if ($sort == 0) {
			exit ();
		}

		$check = $_GET['check'];
		
		$agent = strtolower ( $_SERVER ['HTTP_USER_AGENT'] );
		if (strpos ( $agent, 'msie' ) !== false) {
			$check = iconv ( 'GBK', 'UTF-8', $check );
		}
		
		$this->assign ( 'sort', $sort );
		$this->assign ( 's', $_GET ['s'] + 1 );
		$this->assign ( 'check', $check );
		$this->display ();
	}

}
?>